GET User Matches by Hero
/openmlbb/user/matches/hero/{hero_identifier}
API Path: /api/user/matches/hero/{hero_identifier}
Retrieve the authenticated player's recent matches filtered by a specific hero using a valid JWT. Supports query parameters for season filtering, pagination, and localization. Requires an Authorization header with the JWT from login.
Headers:
- Authorization:
Bearer <jwt>(JWT obtained during login).
Path parameters:
- hero_identifier: Hero identifier as numeric hero ID or hero name. Accepts values like
30,Yi Sun-shin, oryisunshin.
Query parameters:
- sid: Season ID for filtering matches (must be a valid season ID from
/api/user/season). - limit: Maximum number of matches to retrieve (minimum: 1).
- last_cursor: Cursor for pagination. Use the value from
pageInfo.nextCursorin the current response. IfpageInfo.hasNextisfalseorpageInfo.nextCursoris empty, there is no next page. - lang: Language code for localized content (default:
en).
Response structure:
- code: Status code (0 indicates success).
- message: Response message from upstream service.
- traceID: Upstream trace identifier for request debugging/tracking.
- data: Main payload object.
- pageInfo: Pagination metadata object.
- nextCursor: Cursor value for the next page, used for pagination.
- hasNext: Boolean flag indicating whether more results are available.
- count: Number of results returned in the current page.
- hi: Aggregated hero summary for the selected hero and season.
- hid: Hero ID.
- tc: Total Count (matches played with this hero).
- wc: Win Count (matches won with this hero).
- bs: Battle Score (average score; interpret as
bs/100when non-zero). - mr: Match Rating points for this hero.
- mrp: Match Rating percentage/contribution.
- hid_e: Hero metadata object.
- id: Hero ID metadata.
- n: Hero name.
- ix: Hero image URL.
- i2x: Large hero image URL.
- p: Hero power/MMR-style value.
- result: Array of match entries for this hero.
- sid: Season ID.
- bid: Battle ID (numeric).
- hid: Hero ID used in that match.
- k: Kills.
- d: Deaths.
- a: Assists.
- lid: Lane ID (1 EXP, 2 Mid, 3 Roam, 4 Jungle, 5 Gold).
- s: Match score/performance value (commonly interpreted as
s/100). - mvp: MVP flag (1 if MVP, 0 otherwise).
- res: Result (1 = Win, 0 = Loss).
- ts: Match timestamp (unix time).
- hid_e: Hero metadata object.
- id: Hero ID metadata.
- n: Hero name.
- ix: Hero image URL.
- i2x: Large hero image URL.
- bid_s: String battle ID.
- pageInfo: Pagination metadata object.
Pagination example:
First request: /api/user/matches/hero/17?sid=40&limit=10&lang=en
Next request: /api/user/matches/hero/17?sid=40&limit=10&last_cursor=<pageInfo.nextCursor>&lang=en
Stop pagination when pageInfo.hasNext = false or pageInfo.nextCursor is empty.
This endpoint requires JWT. Pass the token via the SDK call argument jwt="YOUR_JWT".
Python Example
from OpenMLBB import OpenMLBB
client = OpenMLBB()
response = client.user.matches_by_hero("miya", jwt="YOUR_JWT", sid=1, limit=10, last_cursor="value", lang="en")
print(response)
Path and Query Parameters
| Name | In | Type | Required | Default |
|---|---|---|---|---|
| hero_identifier | path | string | yes | - |
| sid | query | integer | yes | - |
| limit | query | integer | no | 10 |
| last_cursor | query | string | no | - |
| lang | query | string | no | en |